/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sim.helpers.comparers;

import java.util.Comparator;
import sim.helpers.statistics.ValueHolder;

/**
 *
 * @author artem
 */
public class ValueHolderComparer implements Comparator<ValueHolder>{

    public int compare(ValueHolder vh1, ValueHolder vh2) {
        if (vh1.getIndex() > vh2.getIndex())
            return 1;
        else if (vh1.getIndex() == vh2.getIndex())
            return 0;
        else
            return -1;
    }
}
